home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Education / Mathematics / Mad Math Minute 2.0 / card_3524.txt < prev    next >
Encoding:
Text File  |  1988-04-19  |  4.5 KB  |  224 lines

  1. -- card: 3524 from stack: in.0
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 2601
  5. -- name: Start
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=107 top=133 right=214 bottom=369
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Ready ?
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.  
  23.   global StartTime
  24.   global CorrectAnswers
  25.   global WrongAnswers
  26.   global MaxNumber
  27.   global MaxResult
  28.   global MaxTime
  29.   global MaxProblems
  30.  
  31.   set the cursor to 4
  32.   set the lockScreen to true
  33.   put 0 into CorrectAnswers
  34.   put 0 into WrongAnswers
  35.  
  36.   go card "Global Settings"
  37.  
  38.   get card field "MaxNumber"
  39.   if it >20 or it <1 then
  40.     put 20 into MaxNumber
  41.   else
  42.     put it into MaxNumber
  43.   end if
  44.   get card field "MaxResult"
  45.   if it >20 or it <1 then
  46.     put 20 into MaxResult
  47.   else
  48.     put it into MaxResult
  49.   end if
  50.   get card field "MaxTime"
  51.   put it into MaxTime
  52.   get card field "MaxProblems"
  53.   put it into MaxProblems
  54.  
  55.   go card "Finish"
  56.  
  57.   repeat with l = 1 to number of lines of card field "checklist"
  58.     delete line 1 of card field "checklist"
  59.   end repeat
  60.  
  61.   go card "Problem"
  62.   repeat with l = 1 to number of lines of card field "answerList"
  63.     delete line 1 of card field "answerList"
  64.   end repeat
  65.  
  66.   put " " into previous
  67.   put " " into thisOne
  68.   put MaxNumber into m
  69.   add 1 to m
  70.   repeat with l = 1 to MaxProblems
  71.     repeat until thisOne <> previous
  72.       put the random of m - 1 into firstNumber
  73.       put MaxResult - firstNumber into it
  74.  
  75.       if it >0 then
  76.         if it > MaxNumber then
  77.           put MaxNumber into it
  78.         end if
  79.         put the random of it into secondNumber
  80.       else
  81.         put "0" into secondNumber
  82.       end if
  83.  
  84.       put firstNumber && "+" && secondNumber into thisOne
  85.     end repeat
  86.  
  87.     put thisOne into line l of card field ProblemList
  88.     put thisOne into previous
  89.     beep
  90.   end repeat
  91.   put 1 into card field "Problem Number"
  92.   set the scroll of card field "ProblemList" to 0
  93.   beep 4
  94.   put the secs into StartTime
  95. end mouseUp
  96.  
  97.  
  98.  
  99.  
  100. -- part 2 (button)
  101. -- low flags: 00
  102. -- high flags: A003
  103. -- rect: left=190 top=279 right=301 bottom=290
  104. -- title width / last selected line: 0
  105. -- icon id / first selected line: 0 / 0
  106. -- text alignment: 1
  107. -- font id: 0
  108. -- text size: 12
  109. -- style flags: 0
  110. -- line height: 16
  111. -- part name: I'm Done!
  112. ----- HyperTalk script -----
  113. on mouseUp
  114.   doMenu "Quit HyperCard"
  115. end mouseUp
  116.  
  117.  
  118.  
  119. -- part 10 (button)
  120. -- low flags: 00
  121. -- high flags: A001
  122. -- rect: left=423 top=272 right=327 bottom=491
  123. -- title width / last selected line: 0
  124. -- icon id / first selected line: 32650 / 32650
  125. -- text alignment: 1
  126. -- font id: 0
  127. -- text size: 12
  128. -- style flags: 0
  129. -- line height: 16
  130. -- part name: Dad's Button
  131. ----- HyperTalk script -----
  132. on mouseUp
  133.   visual effect iris close to black
  134.   visual effect iris open
  135.   go to card id 3100
  136. end mouseUp
  137.  
  138.  
  139.  
  140.  
  141. -- part 11 (button)
  142. -- low flags: 00
  143. -- high flags: 2001
  144. -- rect: left=22 top=277 right=315 bottom=63
  145. -- title width / last selected line: 0
  146. -- icon id / first selected line: 21700 / 21700
  147. -- text alignment: 1
  148. -- font id: 0
  149. -- text size: 12
  150. -- style flags: 0
  151. -- line height: 16
  152. -- part name: Home
  153. ----- HyperTalk script -----
  154. on mouseUp
  155.   doMenu "Home"
  156. end mouseUp
  157.  
  158.  
  159.  
  160. -- part 12 (field)
  161. -- low flags: 01
  162. -- high flags: 0001
  163. -- rect: left=107 top=120 right=226 bottom=371
  164. -- title width / last selected line: 0
  165. -- icon id / first selected line: 0 / 0
  166. -- text alignment: 1
  167. -- font id: 3
  168. -- text size: 12
  169. -- style flags: 0
  170. -- line height: 16
  171. -- part name: Copyright
  172. ----- HyperTalk script -----
  173. On MouseUp
  174.   hide card field "Copyright"
  175. End MouseUp
  176.  
  177.  
  178.  
  179. -- part 13 (button)
  180. -- low flags: 00
  181. -- high flags: 2001
  182. -- rect: left=442 top=37 right=73 bottom=483
  183. -- title width / last selected line: 0
  184. -- icon id / first selected line: 19678 / 19678
  185. -- text alignment: 1
  186. -- font id: 0
  187. -- text size: 12
  188. -- style flags: 0
  189. -- line height: 16
  190. -- part name: New Button
  191. ----- HyperTalk script -----
  192. on mouseUp
  193.   show card field "Copyright"
  194. end mouseUp
  195.  
  196.  
  197.  
  198. -- part 14 (button)
  199. -- low flags: 00
  200. -- high flags: 2001
  201. -- rect: left=445 top=144 right=180 bottom=482
  202. -- title width / last selected line: 0
  203. -- icon id / first selected line: 25002 / 25002
  204. -- text alignment: 1
  205. -- font id: 0
  206. -- text size: 12
  207. -- style flags: 0
  208. -- line height: 16
  209. -- part name: New Button
  210. ----- HyperTalk script -----
  211. on mouseUp
  212.   go to card id 3863
  213. end mouseUp
  214.  
  215.  
  216.  
  217.  
  218. -- part contents for card part 12
  219. ----- text -----
  220. Copyright 1988
  221. by
  222. Hans Kruse
  223. 775 Rodney Dr.
  224. Nashville, TN 37215